/*
@author https://yunp.top
 */

@file:JsQualifier("createjs")

package createjs

open external class Rectangle(
    x: Float = definedExternally,
    y: Float = definedExternally,
    width: Float = definedExternally,
    height: Float = definedExternally
) {

    var x: Float
    var y: Float
    var width: Float
    var height: Float

    fun clone(): Rectangle
    fun contains(x: Float, y: Float, width: Float = definedExternally, height: Float = definedExternally)
    fun copy(rectangle: Rectangle): Rectangle
    fun extend(x: Float, y: Float, width: Float = definedExternally, height: Float = definedExternally): Rectangle
    fun intersection(rect: Rectangle): Rectangle
    fun intersects(rect: Rectangle): Boolean
    fun isEmpty(): Boolean
    fun pad(top: Float, left: Float, bottom: Float, right: Float): Rectangle
    fun setValues(
        x: Float = definedExternally,
        y: Float = definedExternally,
        width: Float = definedExternally,
        height: Float = definedExternally
    ): Rectangle

    fun union(rect: Rectangle): Rectangle
}